package yxy.game.pm2.module.plainsCraft;

import org.joda.time.DateTimeConstants;
import yxy.game.pm2.bean.timeline.FutureRunnable;

public class PlainsCraftFuture extends FutureRunnable {
	@Override
	public void tick() {
		handle();
	}

	@Override
	public long period() {
		return DateTimeConstants.MILLIS_PER_MINUTE * 10;// 10分钟一刷
	}

	@Override
	public void init() {
		handle();
	}

	private void handle() {
		try {
			new PlainsCraftHandle().update();
//			ThreadPoolManager.getInstance().execute(new Runnable() {
//				@Override
//				public void run() {
//					new PlainsCraftHandle().update();
//				}
//			});
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
